package com.jsoft.dao.wang.impl;

import com.jsoft.dao.wang.EnterpriseNameDao;
import com.jsoft.entity.wang.EnterpriseName;
import com.jsoft.util.DAO;

import java.util.List;

/**
 * @author MG
 * @email 593020160@qq.com
 * @date 2023/2/22
 */
public class EnterpriseNameDaoImpl extends DAO<EnterpriseName> implements EnterpriseNameDao {


    @Override
    public List<EnterpriseName> findAllEnterprise() throws Exception {
        String sql = "select id,name from enterprise";
        return getForList(sql);
    }
    @Override
    public String findMyEnterprise(Integer id) throws Exception {
        String sql = "select name from enterprise where enterprise_id = ?";
        return getForValue(sql);
    }
}
